Skip to content

fix: restore markdown and section llms routes#146

Merged
dcrawbuck merged 1 commit intomainfrom
dcrawbuck/restore-md-urls
Mar 17, 2026
Merged

fix: restore markdown and section llms routes#146
dcrawbuck merged 1 commit intomainfrom
dcrawbuck/restore-md-urls

Conversation

@dcrawbuck
Copy link
Collaborator

@dcrawbuck dcrawbuck commented Mar 17, 2026

Summary

This restores .md, .mdx, and Accept: text/markdown rewrites for docs pages under TanStack Start. It also restores the per-section llms and llms-full text routes, consolidates the shared LLM response logic, and enables processed markdown in dev so the local llms endpoints work again.

Verification

Ran bun test, bun run build:cf, bun run smoke:llms, and a local dev fetch against /docs/llms-full-ios.txt.


Note

Medium Risk
Touches request middleware routing/redirect behavior for docs and changes MDX postprocessing to always emit processed markdown, which could affect performance and path resolution. Changes are localized to docs/LLM endpoints but impact all docs requests that match rewrite rules.

Overview
Restores docs-to-LLM markdown rewrites under TanStack Start, including .md, .mdx, and Accept: text/markdown-based negotiation, and preserves query strings during both legacy redirects and LLM rewrites.

Reintroduces section-scoped LLM endpoints (/llms-{$section}.txt and /llms-full-{$section}.txt) with 404s for unknown sections, and consolidates LLM text generation/response headers into a new src/lib/llms.ts.

Enables processed markdown generation in development and unifies LLM markdown extraction via getPageMarkdownText, so local llms routes consistently serve processed content.

Written by Cursor Bugbot for commit 7e787f2. This will update automatically on new commits. Configure here.

@dcrawbuck dcrawbuck changed the title Restore markdown and section llms routes fix: restore markdown and section llms routes Mar 17, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
superwall-docs-staging 7e787f2 Commit Preview URL

Branch Preview URL
Mar 17 2026, 06:19 PM

@dcrawbuck dcrawbuck merged commit beafac4 into main Mar 17, 2026
3 checks passed
@dcrawbuck dcrawbuck deleted the dcrawbuck/restore-md-urls branch March 17, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant